import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooMinishopActivityController } from '../../../controllers';
const uctoominishopActivityRouter = new Router();
const minishopActivityController = new uctooMinishopActivityController();

uctoominishopActivityRouter.post('/add', requireUser, minishopActivityController.add);
uctoominishopActivityRouter.post('/edit', requireUser, rowLevelPermission('uctoo/minishop_activity'), minishopActivityController.edit);
uctoominishopActivityRouter.post('/del', requireUser, rowLevelPermission('uctoo/minishop_activity'), minishopActivityController.delete);

//For getting minishopActivity with permission control
uctoominishopActivityRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/minishop_activity'), minishopActivityController.getSingle);
uctoominishopActivityRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/minishop_activity'), minishopActivityController.getMany);
uctoominishopActivityRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/minishop_activity'), minishopActivityController.getMany);

//#endregion AutoCreateCode
export default uctoominishopActivityRouter;
